<template>
  <div class="side-nav-container">
    <div class="contact item">
      <img src="@/assets/Layout/SideNav/contact.png" alt="" />
    </div>
    <div class="tel item">
      <img src="@/assets/Layout/SideNav/tel.png" alt="" />
    </div>
    <div class="qrcode item">
      <img src="@/assets/Layout/SideNav/qrcode.png" alt="" />
    </div>
    <div class="top item" @click="returnTop">
      <img src="@/assets/Layout/SideNav/top.png" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    returnTop() {
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    },
  },
};
</script>

<style scoped lang="less">
.side-nav-container {
  position: fixed;
  bottom: 29px;
  right: 40px;
  width: 48px;
  height: 192px;
  background-color: #fff;
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  .item {
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    &::after {
      content: "";
      width: 32px;
      height: 1px;
      display: block;
      background-color: #ededed;
      left: 8px;
      position: absolute;
      bottom: 0;
    }
  }
  .item:last-child {
    &::after {
      display: none;
    }
  }
}
</style>